﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace NLUNZ.UserControls
{
    public partial class UpdateHeaderBG : System.Web.UI.UserControl
    {
        private string _targetFolder = string.Empty;
        private string _logoFileName = "head_bg.jpg";
        protected void Page_Load(object sender, EventArgs e)
        {

            _targetFolder = Server.MapPath("~/StyleLibrary/Images/");
        }


        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string imgUrl = string.Empty;
            if(RadUpload1.UploadedFiles.Count > 0)
            {
                foreach (UploadedFile uploadedFile in RadUpload1.UploadedFiles)
                {
                    uploadedFile.SaveAs(_targetFolder + _logoFileName, true);
                }
            }
        }
    }
}